package com.ruoyi.zhgd.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.annotation.DataColumn;
import com.ruoyi.common.annotation.DataPermission;
import com.ruoyi.zhgd.domain.TensionRecording;
import com.ruoyi.zhgd.domain.vo.TensionRecordingResVo;
import com.ruoyi.zhgd.domain.vo.TensionRecordingVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 张拉记录Mapper接口
 *
 * @author zyb
 * @date 2023-09-11
 */
public interface TensionRecordingMapper extends BaseMapperPlus<TensionRecordingMapper, TensionRecording, TensionRecordingVo> {

    @DataPermission({
        @DataColumn(key = "deptName", value = "p.dept_id"),
    })
    List<Map> tensionList(Page page,@Param("params") Map<String, Object> params);

    TensionRecording getById(@Param("id") String id);
    TensionRecordingVo queryById(@Param("id") String id);

    @DataPermission({
        @DataColumn(key = "deptName", value = "p.dept_id"),
    })
    TensionRecordingVo getProjectById(@Param("params") Map<String, Object> params);

    List<TensionRecordingVo> getReportBasicDataByBeamNo(@Param("beamNo") String beamNo);

    TensionRecordingVo getOne(@Param(Constants.WRAPPER) Wrapper<TensionRecording> wrapper);

    List<TensionRecordingResVo> check(@Param("deptId") String deptId);

    List<TensionRecordingResVo> selectByLinkCode(@Param("linkCode") String linkCode);

    void batchUpdate(@Param("list") List<TensionRecording> recUpdateList);

    void statusUpdate(@Param("item") TensionRecording item);

    List<TensionRecordingResVo> getListByIds(@Param("ids") List<String> ids);

    TensionRecording selectRecordOne();

    List<String> selectIds(String deptId);
}
